<page-header>

</page-header>
<nz-card [nzTitle]="phActionTpl" [nzExtra]="search">
    <ng-template #phActionTpl>
        <nz-button-group>
            <button (click)="add()"
                    nz-button
                    nzType="primary"><i nz-icon
                                        type="plus"></i> 添加
            </button>
            <button nz-button
                    (click)="export()">
                <i nz-icon
                   nzType="download"></i>导出
            </button>
        </nz-button-group>

        <button style="margin-left: 16px" nz-button *ngIf="selectedRows.length > 0" nzType="danger"><i nz-icon
                                                                                                       nzType="delete"></i>
            批量删除
        </button>
        <!--        <nz-dropdown *ngIf="selectedRows.length > 0"-->
        <!--                     class="mx-sm">-->
        <!--            <button nz-button-->
        <!--                    nz-dropdown>批量操作<i nz-icon-->
        <!--                                       nzType="ellipsis"></i></button>-->
        <!--            <ul nz-menu>-->
        <!--                <li nz-menu-item-->
        <!--                    (click)="deleteMany(selectedRows)"><i nz-icon-->
        <!--                                                          nzType="delete"></i>批量删除-->
        <!--                </li>-->
        <!--&lt;!&ndash;                <li nz-menu-item><i nz-icon&ndash;&gt;-->
        <!--&lt;!&ndash;                                    nzType="delete"></i>禁用&ndash;&gt;-->
        <!--&lt;!&ndash;                </li>&ndash;&gt;-->
        <!--&lt;!&ndash;                <li nz-menu-item><i nz-icon&ndash;&gt;-->
        <!--&lt;!&ndash;                                    nzType="delete"></i>启用&ndash;&gt;-->
        <!--&lt;!&ndash;                </li>&ndash;&gt;-->
        <!--            </ul>-->
        <!--        </nz-dropdown>-->
    </ng-template>
    <ng-template #search>
        <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
    </ng-template>
    <div class="my-md">
        <nz-alert [nzType]="'info'"
                  [nzShowIcon]="true"
                  [nzMessage]="message">
            <ng-template #message>已选择
                <strong class="text-primary">{{ selectedRows.length }}项</strong>
                <a *ngIf="selectedRows.length > 0"
                   (click)="st.clearCheck()"
                   class="ml-lg">清空</a>
            </ng-template>
        </nz-alert>
    </div>
    <st #st [data]="url" [columns]="columns" bordered (change)="stChange($event)"></st>
</nz-card>
